<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>RT-Thread RTOS: Device System</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">RT-Thread RTOS
   &#160;<span id="projectnumber">1.2.0</span>
   </div>
   <div id="projectbrief">An open source embedded real-time operating system</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group___device.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Device System<div class="ingroups"><a class="el" href="group___kernel.html">RT-Thread Kernel API</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrt__device.html">rt_device</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrt__device__blk__geometry.html">rt_device_blk_geometry</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrt__device__blk__sectors.html">rt_device_blk_sectors</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrt__device__graphic__info.html">rt_device_graphic_info</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrt__device__rect__info.html">rt_device_rect_info</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrt__device__graphic__ops.html">rt_device_graphic_ops</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga2944a0dadfee3da236244108ee64ef23"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga2944a0dadfee3da236244108ee64ef23">RT_DEVICE_FLAG_DEACTIVATE</a>&#160;&#160;&#160;0x000</td></tr>
<tr class="separator:ga2944a0dadfee3da236244108ee64ef23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae55023ca390d9c9db1e36f47d70b7bef"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gae55023ca390d9c9db1e36f47d70b7bef">RT_DEVICE_FLAG_RDONLY</a>&#160;&#160;&#160;0x001</td></tr>
<tr class="separator:gae55023ca390d9c9db1e36f47d70b7bef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga23a6a0bf94d7ac84e205b25090ccecac"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga23a6a0bf94d7ac84e205b25090ccecac">RT_DEVICE_FLAG_WRONLY</a>&#160;&#160;&#160;0x002</td></tr>
<tr class="separator:ga23a6a0bf94d7ac84e205b25090ccecac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e347dc85aee3d0316e9544e65150b6a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga9e347dc85aee3d0316e9544e65150b6a">RT_DEVICE_FLAG_RDWR</a>&#160;&#160;&#160;0x003</td></tr>
<tr class="separator:ga9e347dc85aee3d0316e9544e65150b6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafab1082cb2c2c23d3098889e52880eb2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gafab1082cb2c2c23d3098889e52880eb2">RT_DEVICE_FLAG_REMOVABLE</a>&#160;&#160;&#160;0x004</td></tr>
<tr class="separator:gafab1082cb2c2c23d3098889e52880eb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga614c2568c11b488d0c6ab6f77e178933"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga614c2568c11b488d0c6ab6f77e178933">RT_DEVICE_FLAG_STANDALONE</a>&#160;&#160;&#160;0x008</td></tr>
<tr class="separator:ga614c2568c11b488d0c6ab6f77e178933"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafce8c8e2f97455644d244f841292406a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gafce8c8e2f97455644d244f841292406a">RT_DEVICE_FLAG_ACTIVATED</a>&#160;&#160;&#160;0x010</td></tr>
<tr class="separator:gafce8c8e2f97455644d244f841292406a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga77f4d95ded0bdd0012942bad5b676d07"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga77f4d95ded0bdd0012942bad5b676d07">RT_DEVICE_FLAG_SUSPENDED</a>&#160;&#160;&#160;0x020</td></tr>
<tr class="separator:ga77f4d95ded0bdd0012942bad5b676d07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35474a8eeb00f8a72b2f09cbfae9236d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga35474a8eeb00f8a72b2f09cbfae9236d">RT_DEVICE_FLAG_STREAM</a>&#160;&#160;&#160;0x040</td></tr>
<tr class="separator:ga35474a8eeb00f8a72b2f09cbfae9236d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3475a6ac901802ed9fe50f5c13f6274b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga3475a6ac901802ed9fe50f5c13f6274b">RT_DEVICE_FLAG_INT_RX</a>&#160;&#160;&#160;0x100</td></tr>
<tr class="separator:ga3475a6ac901802ed9fe50f5c13f6274b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3bee223726cc7b3c82b93c873bc6c0ea"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga3bee223726cc7b3c82b93c873bc6c0ea">RT_DEVICE_FLAG_DMA_RX</a>&#160;&#160;&#160;0x200</td></tr>
<tr class="separator:ga3bee223726cc7b3c82b93c873bc6c0ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac6963e9aaa345ef576d8c3a378a670e5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gac6963e9aaa345ef576d8c3a378a670e5">RT_DEVICE_FLAG_INT_TX</a>&#160;&#160;&#160;0x400</td></tr>
<tr class="separator:gac6963e9aaa345ef576d8c3a378a670e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac4474c2de32e07786ce187e582c45932"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gac4474c2de32e07786ce187e582c45932">RT_DEVICE_FLAG_DMA_TX</a>&#160;&#160;&#160;0x800</td></tr>
<tr class="separator:gac4474c2de32e07786ce187e582c45932"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaded7e734d35ad96413265a830f2ae0c3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gaded7e734d35ad96413265a830f2ae0c3">RT_DEVICE_OFLAG_CLOSE</a>&#160;&#160;&#160;0x000</td></tr>
<tr class="separator:gaded7e734d35ad96413265a830f2ae0c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35bc30b5382c33312b5c4162936cc62f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga35bc30b5382c33312b5c4162936cc62f">RT_DEVICE_OFLAG_RDONLY</a>&#160;&#160;&#160;0x001</td></tr>
<tr class="separator:ga35bc30b5382c33312b5c4162936cc62f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga09cb4d4a3ba8481e39294eed833e9361"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga09cb4d4a3ba8481e39294eed833e9361">RT_DEVICE_OFLAG_WRONLY</a>&#160;&#160;&#160;0x002</td></tr>
<tr class="separator:ga09cb4d4a3ba8481e39294eed833e9361"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafb08422ef35082a8599c30c663799507"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gafb08422ef35082a8599c30c663799507">RT_DEVICE_OFLAG_RDWR</a>&#160;&#160;&#160;0x003</td></tr>
<tr class="separator:gafb08422ef35082a8599c30c663799507"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7f778feb8fe961d85e30638b72f22b05"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga7f778feb8fe961d85e30638b72f22b05">RT_DEVICE_OFLAG_OPEN</a>&#160;&#160;&#160;0x008</td></tr>
<tr class="separator:ga7f778feb8fe961d85e30638b72f22b05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5f4c6955afabe83249d5808b4146dfc5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga5f4c6955afabe83249d5808b4146dfc5">RT_DEVICE_CTRL_RESUME</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="separator:ga5f4c6955afabe83249d5808b4146dfc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga85db48a4ae2c896e7293d9e3d10d766a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga85db48a4ae2c896e7293d9e3d10d766a">RT_DEVICE_CTRL_SUSPEND</a>&#160;&#160;&#160;0x02</td></tr>
<tr class="separator:ga85db48a4ae2c896e7293d9e3d10d766a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa4f5ab88e23994edc48e6e33d8c763d8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gaa4f5ab88e23994edc48e6e33d8c763d8">RT_DEVICE_CTRL_CHAR_STREAM</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="separator:gaa4f5ab88e23994edc48e6e33d8c763d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4cd94b03d0c06f7bfc5f41d231819775"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga4cd94b03d0c06f7bfc5f41d231819775">RT_DEVICE_CTRL_BLK_GETGEOME</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="separator:ga4cd94b03d0c06f7bfc5f41d231819775"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6d24e14500d918c32389e1ed59745cb2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga6d24e14500d918c32389e1ed59745cb2">RT_DEVICE_CTRL_BLK_SYNC</a>&#160;&#160;&#160;0x11</td></tr>
<tr class="separator:ga6d24e14500d918c32389e1ed59745cb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6dd2bcb09b580d4b066b21fe075da08a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga6dd2bcb09b580d4b066b21fe075da08a">RT_DEVICE_CTRL_BLK_ERASE</a>&#160;&#160;&#160;0x12</td></tr>
<tr class="separator:ga6dd2bcb09b580d4b066b21fe075da08a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac34cb62d4a941224ca03c2362ec78d8f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gac34cb62d4a941224ca03c2362ec78d8f">RT_DEVICE_CTRL_NETIF_GETMAC</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="separator:gac34cb62d4a941224ca03c2362ec78d8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf39ce3167e521f3e8bea8cd32eb97ce2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gaf39ce3167e521f3e8bea8cd32eb97ce2">RT_DEVICE_CTRL_MTD_FORMAT</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="separator:gaf39ce3167e521f3e8bea8cd32eb97ce2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0c92797f20574b9153f8cf9d413297f8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga0c92797f20574b9153f8cf9d413297f8">RT_DEVICE_CTRL_RTC_GET_TIME</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="separator:ga0c92797f20574b9153f8cf9d413297f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae4e1a97713d31ac905f661848bce6835"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gae4e1a97713d31ac905f661848bce6835">RT_DEVICE_CTRL_RTC_SET_TIME</a>&#160;&#160;&#160;0x11</td></tr>
<tr class="separator:gae4e1a97713d31ac905f661848bce6835"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad4c661d33a1b182b4b39e58ff1d14d39"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gad4c661d33a1b182b4b39e58ff1d14d39">RT_DEVICE_CTRL_RTC_GET_ALARM</a>&#160;&#160;&#160;0x12</td></tr>
<tr class="separator:gad4c661d33a1b182b4b39e58ff1d14d39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga33b648fb7b76a061106c46308073db33"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga33b648fb7b76a061106c46308073db33">RT_DEVICE_CTRL_RTC_SET_ALARM</a>&#160;&#160;&#160;0x13</td></tr>
<tr class="separator:ga33b648fb7b76a061106c46308073db33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1778cc1071e28653d95e2027f1f47141"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga1778cc1071e28653d95e2027f1f47141">RT_DEVICE_CTRL_CURSOR_SET_POSITION</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="separator:ga1778cc1071e28653d95e2027f1f47141"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga19d8e9e0bbc3fe1264173764f7e881b2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga19d8e9e0bbc3fe1264173764f7e881b2">RTGRAPHIC_CTRL_RECT_UPDATE</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga19d8e9e0bbc3fe1264173764f7e881b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga129ac0e844b97c6f324ab5995f9cff6b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga129ac0e844b97c6f324ab5995f9cff6b">RTGRAPHIC_PIXEL_POSITION</a>(x, y)&#160;&#160;&#160;((x &lt;&lt; 16) | y)</td></tr>
<tr class="separator:ga129ac0e844b97c6f324ab5995f9cff6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga429003537c58f674b39eb3f9defbd052"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga429003537c58f674b39eb3f9defbd052">rt_device_class_type</a> { <br/>
&#160;&#160;<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052aca8110723cd932d3bb56c656f0ed5b62">RT_Device_Class_Char</a> = 0, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a677c6cfb5e8c1a16569048ac404dcd47">RT_Device_Class_Block</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a82a578cbd8e6866dd4a004ebda3dd38a">RT_Device_Class_NetIf</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a46f0f09d72719157d938555f775fc926">RT_Device_Class_MTD</a>, 
<br/>
&#160;&#160;<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a4a52a6417e964c11476cb7a60b741934">RT_Device_Class_CAN</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a835ac897d5129b2096a3234483a87ea6">RT_Device_Class_RTC</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a71d71b9aa4d514c045b98e54638d4113">RT_Device_Class_Sound</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a273e840320150127b6b53fc25f89ed3a">RT_Device_Class_Graphic</a>, 
<br/>
&#160;&#160;<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052aeb20b6c37b5de0719482540cd4183e9f">RT_Device_Class_I2CBUS</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052aac19a7d8fedfb847854f2eedc2dceb5a">RT_Device_Class_USBDevice</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052ad02f0b8a005ff66e96e755eacacb2e29">RT_Device_Class_USBHost</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052af726afeffa76ee6ac21f54460b540a35">RT_Device_Class_SPIBUS</a>, 
<br/>
&#160;&#160;<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a0acfc2c192da1f374a89d0b04dbbcbe6">RT_Device_Class_SPIDevice</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052aa6bdf0c801df14e94498759a4e77a58c">RT_Device_Class_SDIO</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a45c180e88e77f13dcb2350243fe3bb3e">RT_Device_Class_PM</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a6dfab8ae755d80bd084cb3cbe352691a">RT_Device_Class_Pipe</a>, 
<br/>
&#160;&#160;<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a4fe182c4c087083203282b7a68126d25">RT_Device_Class_Portal</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052a23679c5fd4c9641e47d5f422bdcc25bb">RT_Device_Class_Miscellaneous</a>, 
<a class="el" href="group___device.html#gga429003537c58f674b39eb3f9defbd052ae580460bedb868d5242e8115a41bf00a">RT_Device_Class_Unknown</a>
<br/>
 }</td></tr>
<tr class="separator:ga429003537c58f674b39eb3f9defbd052"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7fb604dd486fbf5e48004b4d94d8eb3e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga7fb604dd486fbf5e48004b4d94d8eb3e">rt_device_find</a> (const char *name)</td></tr>
<tr class="separator:ga7fb604dd486fbf5e48004b4d94d8eb3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaa44b227c43321faffb198ef9c0bb17e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gaaa44b227c43321faffb198ef9c0bb17e">rt_device_register</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev, const char *name, <a class="el" href="group___basic_def.html#ga5acba55f46553417996ac70828b874da">rt_uint16_t</a> flags)</td></tr>
<tr class="separator:gaaa44b227c43321faffb198ef9c0bb17e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga76cf284581e36b7e2244398efbf850b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga76cf284581e36b7e2244398efbf850b5">rt_device_unregister</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev)</td></tr>
<tr class="separator:ga76cf284581e36b7e2244398efbf850b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaee2de8aa1d98e9b1f5870f136c7a1c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gaaee2de8aa1d98e9b1f5870f136c7a1c1">rt_device_init_all</a> (void)</td></tr>
<tr class="separator:gaaee2de8aa1d98e9b1f5870f136c7a1c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga07dfc7fd340b9449d2bd732159ed237f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga07dfc7fd340b9449d2bd732159ed237f">rt_device_set_rx_indicate</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev, <a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>(*rx_ind)(<a class="el" href="structrt__device.html">rt_device_t</a> dev, <a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size))</td></tr>
<tr class="separator:ga07dfc7fd340b9449d2bd732159ed237f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae6340392a3848e3f5e324aa984375b07"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gae6340392a3848e3f5e324aa984375b07">rt_device_set_tx_complete</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev, <a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>(*tx_done)(<a class="el" href="structrt__device.html">rt_device_t</a> dev, void *buffer))</td></tr>
<tr class="separator:gae6340392a3848e3f5e324aa984375b07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga04892007706fe586a1db33284571be7e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga04892007706fe586a1db33284571be7e">rt_device_init</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev)</td></tr>
<tr class="separator:ga04892007706fe586a1db33284571be7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac0cd9f7a81722d69e8720ea4750c17a2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gac0cd9f7a81722d69e8720ea4750c17a2">rt_device_open</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev, <a class="el" href="group___basic_def.html#ga5acba55f46553417996ac70828b874da">rt_uint16_t</a> oflag)</td></tr>
<tr class="separator:gac0cd9f7a81722d69e8720ea4750c17a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga914535247ea0e5477002553ad38b1482"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga914535247ea0e5477002553ad38b1482">rt_device_close</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev)</td></tr>
<tr class="separator:ga914535247ea0e5477002553ad38b1482"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga33660fb6c9217dce99b6b625443453ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#ga33660fb6c9217dce99b6b625443453ba">rt_device_read</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev, <a class="el" href="group___basic_def.html#ga0fd4981851ce935649b6723a81f2f1bf">rt_off_t</a> pos, void *buffer, <a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size)</td></tr>
<tr class="separator:ga33660fb6c9217dce99b6b625443453ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab8d041e5ae9c776332adfee71691e698"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gab8d041e5ae9c776332adfee71691e698">rt_device_write</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev, <a class="el" href="group___basic_def.html#ga0fd4981851ce935649b6723a81f2f1bf">rt_off_t</a> pos, const void *buffer, <a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size)</td></tr>
<tr class="separator:gab8d041e5ae9c776332adfee71691e698"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab0c55790df4b96be5cc50a9c4a7931cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___device.html#gab0c55790df4b96be5cc50a9c4a7931cf">rt_device_control</a> (<a class="el" href="structrt__device.html">rt_device_t</a> dev, <a class="el" href="group___basic_def.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a> cmd, void *arg)</td></tr>
<tr class="separator:gab0c55790df4b96be5cc50a9c4a7931cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The Device System is designed as simple and minimum layer to help communication between applications and drivers.</p>
<p>The Device System provide five interfaces to driver:</p>
<ul>
<li>open, open a device</li>
<li>close, close a device</li>
<li>read, read some data from a device</li>
<li>write, write some data to a device</li>
<li>control, send some control command to a device </li>
</ul>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga2944a0dadfee3da236244108ee64ef23"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_DEACTIVATE&#160;&#160;&#160;0x000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>device flags defitionsdevice is not not initialized </p>

</div>
</div>
<a class="anchor" id="gae55023ca390d9c9db1e36f47d70b7bef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_RDONLY&#160;&#160;&#160;0x001</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>read only </p>

</div>
</div>
<a class="anchor" id="ga23a6a0bf94d7ac84e205b25090ccecac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_WRONLY&#160;&#160;&#160;0x002</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>write only </p>

</div>
</div>
<a class="anchor" id="ga9e347dc85aee3d0316e9544e65150b6a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_RDWR&#160;&#160;&#160;0x003</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>read and write </p>

</div>
</div>
<a class="anchor" id="gafab1082cb2c2c23d3098889e52880eb2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_REMOVABLE&#160;&#160;&#160;0x004</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>removable device </p>

</div>
</div>
<a class="anchor" id="ga614c2568c11b488d0c6ab6f77e178933"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_STANDALONE&#160;&#160;&#160;0x008</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>standalone device </p>

</div>
</div>
<a class="anchor" id="gafce8c8e2f97455644d244f841292406a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_ACTIVATED&#160;&#160;&#160;0x010</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>device is activated </p>

</div>
</div>
<a class="anchor" id="ga77f4d95ded0bdd0012942bad5b676d07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_SUSPENDED&#160;&#160;&#160;0x020</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>device is suspended </p>

</div>
</div>
<a class="anchor" id="ga35474a8eeb00f8a72b2f09cbfae9236d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_STREAM&#160;&#160;&#160;0x040</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>stream mode </p>

</div>
</div>
<a class="anchor" id="ga3475a6ac901802ed9fe50f5c13f6274b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_INT_RX&#160;&#160;&#160;0x100</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>INT mode on Rx </p>

</div>
</div>
<a class="anchor" id="ga3bee223726cc7b3c82b93c873bc6c0ea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_DMA_RX&#160;&#160;&#160;0x200</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>DMA mode on Rx </p>

</div>
</div>
<a class="anchor" id="gac6963e9aaa345ef576d8c3a378a670e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_INT_TX&#160;&#160;&#160;0x400</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>INT mode on Tx </p>

</div>
</div>
<a class="anchor" id="gac4474c2de32e07786ce187e582c45932"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_FLAG_DMA_TX&#160;&#160;&#160;0x800</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>DMA mode on Tx </p>

</div>
</div>
<a class="anchor" id="gaded7e734d35ad96413265a830f2ae0c3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_OFLAG_CLOSE&#160;&#160;&#160;0x000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>device is closed </p>

</div>
</div>
<a class="anchor" id="ga35bc30b5382c33312b5c4162936cc62f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_OFLAG_RDONLY&#160;&#160;&#160;0x001</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>read only access </p>

</div>
</div>
<a class="anchor" id="ga09cb4d4a3ba8481e39294eed833e9361"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_OFLAG_WRONLY&#160;&#160;&#160;0x002</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>write only access </p>

</div>
</div>
<a class="anchor" id="gafb08422ef35082a8599c30c663799507"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_OFLAG_RDWR&#160;&#160;&#160;0x003</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>read and write </p>

</div>
</div>
<a class="anchor" id="ga7f778feb8fe961d85e30638b72f22b05"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_OFLAG_OPEN&#160;&#160;&#160;0x008</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>device is opened </p>

</div>
</div>
<a class="anchor" id="ga5f4c6955afabe83249d5808b4146dfc5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_RESUME&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>general device commandsresume device </p>

</div>
</div>
<a class="anchor" id="ga85db48a4ae2c896e7293d9e3d10d766a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_SUSPEND&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>suspend device </p>

</div>
</div>
<a class="anchor" id="gaa4f5ab88e23994edc48e6e33d8c763d8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_CHAR_STREAM&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>special device commandsstream mode on char device </p>

</div>
</div>
<a class="anchor" id="ga4cd94b03d0c06f7bfc5f41d231819775"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_BLK_GETGEOME&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>get geometry information </p>

</div>
</div>
<a class="anchor" id="ga6d24e14500d918c32389e1ed59745cb2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_BLK_SYNC&#160;&#160;&#160;0x11</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>flush data to block device </p>

</div>
</div>
<a class="anchor" id="ga6dd2bcb09b580d4b066b21fe075da08a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_BLK_ERASE&#160;&#160;&#160;0x12</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>erase block on block device </p>

</div>
</div>
<a class="anchor" id="gac34cb62d4a941224ca03c2362ec78d8f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_NETIF_GETMAC&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>get mac address </p>

</div>
</div>
<a class="anchor" id="gaf39ce3167e521f3e8bea8cd32eb97ce2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_MTD_FORMAT&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>format a MTD device </p>

</div>
</div>
<a class="anchor" id="ga0c92797f20574b9153f8cf9d413297f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_RTC_GET_TIME&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>get time </p>

</div>
</div>
<a class="anchor" id="gae4e1a97713d31ac905f661848bce6835"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_RTC_SET_TIME&#160;&#160;&#160;0x11</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>set time </p>

</div>
</div>
<a class="anchor" id="gad4c661d33a1b182b4b39e58ff1d14d39"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_RTC_GET_ALARM&#160;&#160;&#160;0x12</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>get alarm </p>

</div>
</div>
<a class="anchor" id="ga33b648fb7b76a061106c46308073db33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_RTC_SET_ALARM&#160;&#160;&#160;0x13</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>set alarm </p>

</div>
</div>
<a class="anchor" id="ga1778cc1071e28653d95e2027f1f47141"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RT_DEVICE_CTRL_CURSOR_SET_POSITION&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>cursor control command </p>

</div>
</div>
<a class="anchor" id="ga19d8e9e0bbc3fe1264173764f7e881b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RTGRAPHIC_CTRL_RECT_UPDATE&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>graphic device control command </p>

</div>
</div>
<a class="anchor" id="ga129ac0e844b97c6f324ab5995f9cff6b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RTGRAPHIC_PIXEL_POSITION</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">y&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((x &lt;&lt; 16) | y)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>build a pixel position according to (x, y) coordinates. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga429003537c58f674b39eb3f9defbd052"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group___device.html#ga429003537c58f674b39eb3f9defbd052">rt_device_class_type</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>device (I/O) class type </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052aca8110723cd932d3bb56c656f0ed5b62"></a>RT_Device_Class_Char</em>&nbsp;</td><td class="fielddoc">
<p>character device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a677c6cfb5e8c1a16569048ac404dcd47"></a>RT_Device_Class_Block</em>&nbsp;</td><td class="fielddoc">
<p>block device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a82a578cbd8e6866dd4a004ebda3dd38a"></a>RT_Device_Class_NetIf</em>&nbsp;</td><td class="fielddoc">
<p>net interface </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a46f0f09d72719157d938555f775fc926"></a>RT_Device_Class_MTD</em>&nbsp;</td><td class="fielddoc">
<p>memory device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a4a52a6417e964c11476cb7a60b741934"></a>RT_Device_Class_CAN</em>&nbsp;</td><td class="fielddoc">
<p>CAN device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a835ac897d5129b2096a3234483a87ea6"></a>RT_Device_Class_RTC</em>&nbsp;</td><td class="fielddoc">
<p>RTC device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a71d71b9aa4d514c045b98e54638d4113"></a>RT_Device_Class_Sound</em>&nbsp;</td><td class="fielddoc">
<p>Sound device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a273e840320150127b6b53fc25f89ed3a"></a>RT_Device_Class_Graphic</em>&nbsp;</td><td class="fielddoc">
<p>Graphic device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052aeb20b6c37b5de0719482540cd4183e9f"></a>RT_Device_Class_I2CBUS</em>&nbsp;</td><td class="fielddoc">
<p>I2C bus device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052aac19a7d8fedfb847854f2eedc2dceb5a"></a>RT_Device_Class_USBDevice</em>&nbsp;</td><td class="fielddoc">
<p>USB slave device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052ad02f0b8a005ff66e96e755eacacb2e29"></a>RT_Device_Class_USBHost</em>&nbsp;</td><td class="fielddoc">
<p>USB host bus </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052af726afeffa76ee6ac21f54460b540a35"></a>RT_Device_Class_SPIBUS</em>&nbsp;</td><td class="fielddoc">
<p>SPI bus device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a0acfc2c192da1f374a89d0b04dbbcbe6"></a>RT_Device_Class_SPIDevice</em>&nbsp;</td><td class="fielddoc">
<p>SPI device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052aa6bdf0c801df14e94498759a4e77a58c"></a>RT_Device_Class_SDIO</em>&nbsp;</td><td class="fielddoc">
<p>SDIO bus device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a45c180e88e77f13dcb2350243fe3bb3e"></a>RT_Device_Class_PM</em>&nbsp;</td><td class="fielddoc">
<p>PM pseudo device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a6dfab8ae755d80bd084cb3cbe352691a"></a>RT_Device_Class_Pipe</em>&nbsp;</td><td class="fielddoc">
<p>Pipe device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a4fe182c4c087083203282b7a68126d25"></a>RT_Device_Class_Portal</em>&nbsp;</td><td class="fielddoc">
<p>Portal device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052a23679c5fd4c9641e47d5f422bdcc25bb"></a>RT_Device_Class_Miscellaneous</em>&nbsp;</td><td class="fielddoc">
<p>Miscellaneous device </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga429003537c58f674b39eb3f9defbd052ae580460bedb868d5242e8115a41bf00a"></a>RT_Device_Class_Unknown</em>&nbsp;</td><td class="fielddoc">
<p>unknown device </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga7fb604dd486fbf5e48004b4d94d8eb3e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structrt__device.html">rt_device_t</a> rt_device_find </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function finds a device driver by specified name.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>the device driver's name</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the registered device driver on successful, or RT_NULL on failure. </dd></dl>

</div>
</div>
<a class="anchor" id="gaaa44b227c43321faffb198ef9c0bb17e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_register </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga5acba55f46553417996ac70828b874da">rt_uint16_t</a>&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function registers a device driver with specified name.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure </td></tr>
    <tr><td class="paramname">name</td><td>the device driver's name </td></tr>
    <tr><td class="paramname">flags</td><td>the flag of device</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the error code, RT_EOK on initialization successfully. </dd></dl>

</div>
</div>
<a class="anchor" id="ga76cf284581e36b7e2244398efbf850b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_unregister </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function removes a previously registered device driver</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the error code, RT_EOK on successfully. </dd></dl>

</div>
</div>
<a class="anchor" id="gaaee2de8aa1d98e9b1f5870f136c7a1c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_init_all </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function initializes all registered device driver</p>
<dl class="section return"><dt>Returns</dt><dd>the error code, RT_EOK on successfully. </dd></dl>

</div>
</div>
<a class="anchor" id="ga07dfc7fd340b9449d2bd732159ed237f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_set_rx_indicate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>(*)(<a class="el" href="structrt__device.html">rt_device_t</a> dev, <a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size)&#160;</td>
          <td class="paramname"><em>rx_ind</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set the indication callback function when device receives data.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure </td></tr>
    <tr><td class="paramname">rx_ind</td><td>the indication callback function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>RT_EOK </dd></dl>

</div>
</div>
<a class="anchor" id="gae6340392a3848e3f5e324aa984375b07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_set_tx_complete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a>(*)(<a class="el" href="structrt__device.html">rt_device_t</a> dev, void *buffer)&#160;</td>
          <td class="paramname"><em>tx_done</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set the indication callback function when device has written data to physical hardware.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure </td></tr>
    <tr><td class="paramname">tx_done</td><td>the indication callback function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>RT_EOK </dd></dl>

</div>
</div>
<a class="anchor" id="ga04892007706fe586a1db33284571be7e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will initialize the specified device</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the result </dd></dl>

</div>
</div>
<a class="anchor" id="gac0cd9f7a81722d69e8720ea4750c17a2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga5acba55f46553417996ac70828b874da">rt_uint16_t</a>&#160;</td>
          <td class="paramname"><em>oflag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will open a device</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure </td></tr>
    <tr><td class="paramname">oflag</td><td>the flags for device open</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the result </dd></dl>

</div>
</div>
<a class="anchor" id="ga914535247ea0e5477002553ad38b1482"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will close a device</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the result </dd></dl>

</div>
</div>
<a class="anchor" id="ga33660fb6c9217dce99b6b625443453ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> rt_device_read </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga0fd4981851ce935649b6723a81f2f1bf">rt_off_t</a>&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will read some data from a device.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure </td></tr>
    <tr><td class="paramname">pos</td><td>the position of reading </td></tr>
    <tr><td class="paramname">buffer</td><td>the data buffer to save read data </td></tr>
    <tr><td class="paramname">size</td><td>the size of buffer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the actually read size on successful, otherwise negative returned.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>since 0.4.0, the unit of size/pos is a block for block device. </dd></dl>

</div>
</div>
<a class="anchor" id="gab8d041e5ae9c776332adfee71691e698"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> rt_device_write </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga0fd4981851ce935649b6723a81f2f1bf">rt_off_t</a>&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will write some data to a device.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure </td></tr>
    <tr><td class="paramname">pos</td><td>the position of written </td></tr>
    <tr><td class="paramname">buffer</td><td>the data buffer to be written to device </td></tr>
    <tr><td class="paramname">size</td><td>the size of buffer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the actually written size on successful, otherwise negative returned.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>since 0.4.0, the unit of size/pos is a block for block device. </dd></dl>

</div>
</div>
<a class="anchor" id="gab0c55790df4b96be5cc50a9c4a7931cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga42df42aabf676f2a89f5af2208b79950">rt_err_t</a> rt_device_control </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__device.html">rt_device_t</a>&#160;</td>
          <td class="paramname"><em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga585e2ad0fbab0f83817cb61373465df6">rt_uint8_t</a>&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will perform a variety of control functions on devices.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dev</td><td>the pointer of device driver structure </td></tr>
    <tr><td class="paramname">cmd</td><td>the command sent to device </td></tr>
    <tr><td class="paramname">arg</td><td>the argument of command</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the result </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Jan 6 2014 23:05:02 for RT-Thread RTOS by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
  </ul>
</div>
</body>
</html>
